package org.vectrics.recruiter.job;

public interface JobStatusTransitionFilter {
	public static String BEAN_ID = "job.status.transition.filter";
	
	/**
	 * Possible status transitions are determined by the JobStatusReasonTypeXref entries.  If certain
	 * transitions should not be allowed for a particular job or particular data owner, this method should be 
	 * used to determine which statuses should be allowed.  This method will be called for every possible
	 * JobStatusType that is being considered for the current job's status.
	 * @param job The Job which is being transitioned to a new status.
	 * @param fromJobStatusType The current job status.
	 * @param toJobStatusType One of the statuses that the JobStatusReasonTypeXref entries allows transtion 
	 * 		to from the current job status.
	 * @return True if status transition should be allowed, False if status transition is not allowed.
	 */
	public boolean allowTransition(Job job, JobStatusType fromJobStatusType, JobStatusType toJobStatusType);
}
